%cd%/7z/7za.exe x -aoa -oApache-Subversion Apache-Subversion*.zip 

::config path 
cd Apache-Subversion

set regpath=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
set evname=SVN_HOME
set SVNpath=%cd%
reg add "%regpath%" /v %evname% /t REG_SZ /d %SVNpath% /f

wmic environment where "name='PATH' and username='<system>'" set VariableValue="%PATH%;%SVNpath%\bin;"


::创建SVN库
mkdir LawyerWorkSpace
svnadmin create LawyerWorkSpace

::修改库的配置
cd ../

java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/svnserve.conf" "# anon-access = read" "anon-access = none"
java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/svnserve.conf" "# auth-access = write" "auth-access = write"
java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/svnserve.conf" "# password-db = passwd" "password-db = passwd"
java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/svnserve.conf" "# authz-db = authz" "authz-db = authz"
java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/svnserve.conf" "# realm = My First Repository" "realm = My First Repository"

java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/passwd" "# harry = harryssecret" "harry = Changeme_123"
java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/passwd" "# sally = sallyssecret" "sally = Changeme_123"

java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/authz" "# harry_and_sally = harry,sally" "harry_and_sally = harry,sally"
java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/authz" "# \[\/foo\/bar\]" "[/]"
java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/authz" "# harry = rw" "harry = rw"
java ModifyConfig "Apache-Subversion/LawyerWorkSpace/conf/authz" "# \* =" "* ="

